<ui:component xmlns="http://www.w3.org/1999/xhtml"
              xmlns:ui="http://java.sun.com/jsf/facelets"
              xmlns:p="http://primefaces.org/ui"
              xmlns:h="http://java.sun.com/jsf/html"
              xmlns:f="http://java.sun.com/jsf/core">

    <p:ajaxStatus onstart="statusDialog.show();" onsuccess="statusDialog.hide();"/>  

    <p:dialog modal="true" widgetVar="statusDialog" header="Aguarde..."
              draggable="false" closable="false" resizable="false">  
        <p:graphicImage value="/resources/img/aguarde.gif" />  
    </p:dialog>
</ui:component>

